package com.eightworld3.supermarket.service.dto.result;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * @author EightWorld3
 */
@Schema(description = "结果类")
public class ResponseResult {

    /**
     * 状态码，0失败，1成功
     */
    @Schema(name = "code",example = "1",requiredMode = Schema.RequiredMode.REQUIRED,description = "状态码")
    private Integer code;

    /**
     * 消息
     */
    @Schema(name = "message",example = "你好，世界",description = "消息")
    private String message;

    /**
     * 数据
     */
    @Schema(name = "data",example = "Object",description = "数据")
    private Object data;

    public ResponseResult(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResponseResult(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
